# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Link Dupont <link@subpop.net>

pkgname=devhelp
pkgver=3.30.0+40+g7c92e1b3
pkgrel=2
pkgdesc="API documentation browser for GNOME"
arch=(x86_64)
license=(GPL)
url="https://wiki.gnome.org/Apps/Devhelp"
depends=(webkit2gtk)
makedepends=(gtk-doc git appstream-glib gobject-introspection meson yelp-tools)
groups=(gnome-extra)
_commit=7c92e1b3f64915eb2245aae7a41588cc80ff54e1  # master
source=("git+https://gitlab.gnome.org/GNOME/devhelp.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
